<!-- begin user editable theme area: body header and body navigation -->

<header role="banner">
	<div>
		<h1><a href="<?= $site_url ?>" title="Go to My Site">My Site</a></h1>

		<p id="txp-logout"><a href="<?= $this->urlTo("/logout") ?>">Logout</a></p>

		<nav role="navigation">
			<h4 class="doc-outline">Navigation</h4>

			<ul data-dropdown="dropdown">
<?php foreach ($tabs as $tab => $subtabs): ?>
<?php if (!empty($subtabs)): ?>
					<li class="dropdown<?= ($tab === $selected_tab) ? ' active' : '' ?>"><a class="dropdown-toggle" href="<?= $this->urlTo("/{$tab}") ?>"><?= ucwords(str_replace('_', ' ', $tab)) ?></a>
						<ul class="dropdown-menu">
<?php foreach ($subtabs as $subtab): ?>
							<li<?= ($subtab === $selected_subtab) ? ' class="active"' : '' ?>><a href="<?= $this->urlTo("/{$tab}/{$subtab}") ?>"><?= ucwords(str_replace('_', ' ', $subtab)) ?></a></li>
<?php endforeach; ?>
						</ul>
					</li>
<?php endif; ?>
<?php endforeach; ?>
			</ul>

			<select>
<?php foreach ($tabs as $tab => $subtabs): ?>
<?php if (!empty($subtabs)): ?>
				<optgroup label="<?= ucwords(str_replace('_', ' ', $tab)) ?>">
<?php foreach ($subtabs as $subtab): ?>
					<option value="<?= $this->urlTo("/{$tab}/{$subtab}") ?>"<?= ($subtab === $selected_subtab) ? ' selected="selected"' : '' ?>><?= ucwords(str_replace('_', ' ', $subtab)) ?></option>
<?php endforeach; ?>
				</optgroup>
<?php endif; ?>
<?php endforeach; ?>
			</select>

		</nav>

	</div>
</header>